//
//  AECommunityPublishViewModel.h
//  AESOLAR_IOS
//
//  Created by Bin Tang on 2024/10/18.
//  Copyright © 2024 Mr.Wang. All rights reserved.
//

#import "TYZBaseViewModel.h"
#import "EDSImageVideoModel.h"
#import "AEUploadFileRequest.h" // 上传图片
#import "AENewsAddRequest.h" // 添加新闻

NS_ASSUME_NONNULL_BEGIN

/// 社群发布
@interface AECommunityPublishViewModel : TYZBaseViewModel


@property (nonatomic, assign) int libType; ///< 类型；0表示图片；1表示视频；2表示音频

@property (nonatomic, assign) CGSize imageSize; ///< 显示图片的大小(图片、视频图片)

@property (nonatomic, assign) float imageWH; ///< 只是图片的宽高。不是视频图片的

@property (nonatomic, assign) CGFloat imagesHeight; ///< 图片的总高度

/// 其它图片视频个数
@property (nonatomic, assign) NSInteger addImageVideoNum;

@property (nonatomic, strong) AENewsAddReqModel *reqModel;


/**
 得到图片的大小
 
 @param model model description
 @return return value description
 */
- (CGSize)getImageSize:(EDSImageVideoModel *)model;


/// 上传图片
/// - Parameters:
///   - imageModel: imageModel description
///   - completion: completion description
- (void)requestWithUploadImage:(EDSImageVideoModel *)imageModel completion:(RequestCompletionBlock)completion;

/// 添加新闻
/// @param completion completion description
- (void)requestWithNewsAdd:(RequestCompletionBlock)completion;

@end

NS_ASSUME_NONNULL_END
